feat(ci): support release candidates via changesets pre mode#3628
Conversation
Detect prereleases by hyphen-in-version in release.yml and: - mark the GitHub release with --prerelease (no Latest badge) - skip the marketing-site changelog dispatch (no PR per RC) - keep the dispatch firing for stable releases Also fix the CLI version-check (initialBanner.ts) to use semver.lt instead of locale string compare so users on an RC are correctly told to upgrade once the matching stable ships. Removes the stale :v4-beta Docker floating tag from the webapp and worker-v4 publish workflows. v4 is GA; the tag is misleading and inconsistent with the npm side (where v4-beta is already frozen at 4.0.4). Self-hosters should pin to a versioned tag.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
🧰 Additional context used📓 Path-based instructions (5)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.ts📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
Files:
**/*.{ts,tsx,js,jsx,json,md,css,scss}📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (2)📚 Learning: 2026-03-22T13:26:12.060ZApplied to files:
📚 Learning: 2026-03-22T19:24:14.403ZApplied to files:
🔇 Additional comments (2)
WalkthroughThis PR introduces proper semantic versioning handling across build and CLI infrastructure. It removes redundant v4-beta tag generation from two Docker image publishing workflows, adds prerelease detection to the release workflow to conditionally flag GitHub releases and skip changelog dispatch for prerelease versions, and upgrades the CLI's update-check logic to use semantic version comparison instead of string comparison, improving handling of prerelease versions. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
## Summary Adds `.changeset/pre.json` to put the repo into changesets pre mode with dist-tag `rc`. After this merges, the changesets bot regenerates the existing release PR as `chore: release v4.5.0-rc.0`. Merging that PR publishes the first release candidate of 4.5.0 to npm under `@rc`. The pre-mode plumbing landed in #3628. The release content (chat.agent + sessions + ai prompts + dashboard server-changes) landed in #3629. ## What ships when the bot PR merges Under dist-tag `rc`: - `@trigger.dev/{sdk,core,build,react-hooks,redis-worker,plugins,python,rsc,schema-to-json}@4.5.0-rc.0` - `trigger.dev@4.5.0-rc.0` Plus: - Docker image `ghcr.io/triggerdotdev/trigger.dev:v4.5.0-rc.0` (immutable tag only — `:v4-beta` is not touched) - Helm chart `oci://ghcr.io/triggerdotdev/charts/trigger.dev:4.5.0-rc.0` - GitHub release `v4.5.0-rc.0` marked as Pre-release (no Latest badge) What does NOT happen: - npm `latest` stays at 4.4.6 - No marketing-site changelog PR (gated on `is_prerelease != 'true'`) - Docker `:latest` not touched (we never push it anyway in this repo) ## Iteration For subsequent rc.N: add a regular changeset to main, bot regenerates the release PR as `v4.5.0-rc.N`. Merge to ship. ## Exiting pre mode When ready to ship stable: `pnpm exec changeset pre exit`, push, merge regenerated PR. That publishes `4.5.0` under `latest` and fires the marketing-site dispatch.
Summary
Enables shipping
X.Y.Z-rc.Nprereleases of@trigger.dev/*via changesets pre mode. RCs publish under thercnpm dist-tag, never claimlatest, and don't trigger marketing-site changelog PRs. The plumbing is hyphen-in-version detection inrelease.yml— no separate workflow, no opt-in flag at publish time.Validated end-to-end against a sandbox repo (real npm publishes, Docker builds, Helm chart pushes, GitHub releases) before porting back. Full RC lifecycle tested: pre enter → rc.0 → iterate to rc.1 → pre exit → stable. Plus interaction with the existing release-branch hotfix flow.
What changes
release.ymlis_prereleaseoutput (hyphen-in-version)--prereleaseflag for RC publishes (Pre-release badge, not Latest)dispatch-changelogjob gated onis_prerelease != 'true'— no marketing-site PR per RCDocker workflows
:v4-betafloating tag entirely frompublish-webapp.ymlandpublish-worker-v4.yml. v4 is GA; the tag is a misnomer and is already inconsistent with the npm side (npmv4-betadist-tag was frozen at 4.0.4 months ago while Docker:v4-betakept bumping). Self-hosters should pin to a versioned tag going forward — the last value of:v4-betastays frozen wherever it currently points.CLI version-check fix (
packages/cli-v3/src/utilities/initialBanner.ts)Switches the "new version available" comparison from JavaScript
localeComparetosemver.lt. The old comparison handledX.Y.Z-rc.NvsX.Y.Zincorrectly — a user on4.5.0-rc.0would never be prompted to upgrade once4.5.0stable shipped (lex order put the prerelease ahead of the bare version). Real semver gets this right.Stable users were never affected: the check queries the
@latestdist-tag, which by convention never points at a prerelease.How an RC actually publishes after this
pnpm exec changeset pre enter rcon main, push thepre.jsonchore: release v<X.Y.Z>-rc.0release.ymlrunschangeset publishwhich readspre.json.tagand publishes under--tag rc. GitHub release marked Pre-release. No marketing-site dispatch.rc.1,rc.2, …pnpm exec changeset pre exit, push, merge regenerated PR → stable ships underlatestand the marketing-site dispatch fires.